﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pasys.PresentationCore;
using System.Windows.Forms;

namespace Pasys.PresentationCore
{
    public class SettingViewBaseProvider<T> : AbstractSettingViewProvider where T : Control, new()
    {
        protected override Control CreateControl()
        {
            var f = new T()
            {
            };

            var page = f as ISettingViewPage;
            if (page != null)
            {
                page.SettingChanged += (s, e) =>
                {
                    this.Changed = true;
                };
            }
            return f;
        }
    }

    public class SettingViewPathBaseProvider : AbstractSettingViewProvider 
    {
        public SettingViewPathBaseProvider(string key):base(true)
        {
            this.SettingKey = key;
        }
        protected override Control CreateControl()
        {
            return null;
        }
    }


}
